package com.example.websocket.service.impl;

import com.example.websocket.dao.FriendMapper;
import com.example.websocket.entity.Friend;
import com.example.websocket.service.IFriendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class FriendServiceImpl implements IFriendService {
    @Autowired
    FriendMapper friendMapper;

    @Override
    public int deleteByPrimaryKey(int id1,int id2) {
        return friendMapper.deleteByPrimaryKey(id1,id2);
    }

    @Override
    public int insert(Friend record) {
        return friendMapper.insert(record);
    }

    @Override
    public Friend selectByPrimaryKey(Integer id) {
        return friendMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKey(Friend record) {
        return friendMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Friend> selectByUserid(int id) {
        return friendMapper.selectByUserid(id);
    }
}
